![]() |
WOLF core
WOLF: A Modular Estimation Framework for Robotics
|
class StateBlock More...
#include <core/state_block/state_block.h>
Public Member Functions | |
| StateBlock (const std::string &_type, const SizeEigen _size, bool _fixed=false, LocalParametrizationBasePtr _local_param_ptr=nullptr, bool _transformable=true) | |
| Constructor from size. More... | |
| StateBlock (const std::string &_type, const Eigen::VectorXd &_state, bool _fixed=false, LocalParametrizationBasePtr _local_param_ptr=nullptr, bool _transformable=true) | |
| Constructor from vector. More... | |
| StateBlock (const StateBlock &o)=delete | |
| StateBlock (StateBlock &&o)=delete | |
| StateBlock & | operator= (const StateBlock &o)=delete |
| virtual | ~StateBlock () |
| Destructor. More... | |
| std::string | getType () const |
| Returns the type of the state block. More... | |
| Eigen::VectorXd | getState () const |
| Returns the state vector. More... | |
| double * | getStateData () |
| Returns the state vector data array. More... | |
| void | setState (const Eigen::VectorXd &_state, const bool _notify=true) |
| Sets the state vector. More... | |
| SizeEigen | getSize () const |
| Returns the state size. More... | |
| SizeEigen | getLocalSize () const |
| Returns the size of the local parametrization. More... | |
| bool | isFixed () const |
| Returns if the state is fixed (not estimated) More... | |
| void | fix () |
| Sets the state as fixed. More... | |
| void | unfix () |
| Sets the state as estimated. More... | |
| void | setFixed (bool _fixed) |
| Sets the state status. More... | |
| bool | hasLocalParametrization () const |
| Returns if the state has a local parametrization. More... | |
| LocalParametrizationBasePtr | getLocalParametrization () const |
| Returns the state local parametrization ptr. More... | |
| void | setLocalParametrization (LocalParametrizationBasePtr _local_param) |
| Sets a local parametrization. More... | |
| void | removeLocalParametrization () |
| Removes the state_block local parametrization. More... | |
| bool | stateUpdated () const |
| Return if state has been updated. More... | |
| bool | fixUpdated () const |
| Return if fix/unfix has been updated. More... | |
| bool | localParamUpdated () const |
| Return if local parameterization has been updated. More... | |
| void | resetStateUpdated () |
| Set state_updated_ to false. More... | |
| void | resetFixUpdated () |
| Set fix_updated_ to false. More... | |
| void | resetLocalParamUpdated () |
| Set localk_param_updated_ to false. More... | |
| virtual void | setIdentity (bool _notify=true) |
| void | setZero (bool _notify=true) |
| virtual Eigen::VectorXd | identity () const |
| Eigen::VectorXd | zero () const |
| void | perturb (double amplitude=0.1) |
| perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ] More... | |
| bool | isTransformable () const |
| void | setTransformable (bool _trf=true) |
| void | setNonTransformable () |
| virtual void | transform (const VectorComposite &_transformation)=0 |
| void | plus (const Eigen::VectorXd &_dv) |
| bool | isValid (double tolerance=Constants::EPS) |
Protected Attributes | |
| std::string | type_ |
| Type of the derived class. More... | |
| std::atomic_bool | fixed_ |
| Key to indicate whether the state is fixed or not. More... | |
| std::atomic< SizeEigen > | state_size_ |
| State vector size. More... | |
| Eigen::VectorXd | state_ |
| State vector storing the state values. More... | |
| std::mutex | mut_state_ |
| State vector mutex. More... | |
| LocalParametrizationBasePtr | local_param_ptr_ |
| Local parametrization useful for optimizing in the tangent space to the manifold. More... | |
| std::atomic_bool | state_updated_ |
| Flag to indicate whether the state has been updated or not. More... | |
| std::atomic_bool | fix_updated_ |
| Flag to indicate whether the status has been updated or not. More... | |
| std::atomic_bool | local_param_updated_ |
| Flag to indicate whether the local_parameterization has been updated or not. More... | |
| bool | transformable_ |
| Flag to indicate if the state block can be transformed to another reference frame. More... | |
class StateBlock
This class implements a state block for general nonlinear optimization. It offers the following functionality:
|
inline |
Constructor from size.
| _size | is state size |
| _fixed | Indicates this state is not estimated and thus acts as a fixed parameter |
| _local_param_ptr | pointer to the local parametrization for the block |
|
inline |
Constructor from vector.
| _state | is state vector |
| _fixed | Indicates this state is not estimated and thus acts as a fixed parameter |
| _local_param_ptr | pointer to the local parametrization for the block Explicitly not copyable/movable |
|
delete |
|
delete |
|
inlinevirtual |
Destructor.
|
inline |
Sets the state as fixed.
|
inline |
Return if fix/unfix has been updated.
|
inline |
Returns the state local parametrization ptr.
|
inline |
Returns the size of the local parametrization.
|
inline |
Returns the state size.
|
inline |
Returns the state vector.
|
inline |
Returns the state vector data array.
|
inline |
Returns the type of the state block.
|
inline |
Returns if the state has a local parametrization.
|
inlinevirtual |
Reimplemented in wolf::StateHomogeneous3d, and wolf::StateQuaternion.
|
inline |
Returns if the state is fixed (not estimated)
|
inline |
|
inline |
|
inline |
Return if local parameterization has been updated.
|
delete |
| void wolf::StateBlock::perturb | ( | double | amplitude = 0.1 | ) |
perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ]
| void wolf::StateBlock::plus | ( | const Eigen::VectorXd & | _dv | ) |
|
inline |
Removes the state_block local parametrization.
|
inline |
Set fix_updated_ to false.
|
inline |
Set localk_param_updated_ to false.
|
inline |
Set state_updated_ to false.
| void wolf::StateBlock::setFixed | ( | bool | _fixed | ) |
Sets the state status.
|
inlinevirtual |
Reimplemented in wolf::StateHomogeneous3d, and wolf::StateQuaternion.
|
inline |
Sets a local parametrization.
|
inline |
| void wolf::StateBlock::setState | ( | const Eigen::VectorXd & | _state, |
| const bool | _notify = true |
||
| ) |
Sets the state vector.
|
inline |
|
inline |
|
inline |
Return if state has been updated.
|
pure virtual |
|
inline |
Sets the state as estimated.
|
inline |
|
protected |
Flag to indicate whether the status has been updated or not.
|
protected |
Key to indicate whether the state is fixed or not.
|
protected |
Local parametrization useful for optimizing in the tangent space to the manifold.
|
protected |
Flag to indicate whether the local_parameterization has been updated or not.
|
mutableprotected |
State vector mutex.
|
protected |
State vector storing the state values.
|
protected |
State vector size.
|
protected |
Flag to indicate whether the state has been updated or not.
|
protected |
Flag to indicate if the state block can be transformed to another reference frame.
|
protected |
Type of the derived class.